﻿$curip = ""
while(1)
{
    $get = Invoke-WebRequest -uri http://ipaddress:8081/posthost
	if($get.Content.Length -eq 0)
	{
		echo ([datetime]::Now) 上传失败
		Sleep 30
		continue
	}
	$newip = [System.Text.Encoding]::ASCII.GetString($get.Content)
	if($curip -ne $newip)
    {
		$curip = $newip
		echo ([datetime]::Now) $curip
    }
    Sleep 60
}